package datastruct.sortedset;


public class Element implements Comparable<Element> {
    public String member;
    public double score;

    public Element(double score, String member) {
        this.score = score;
        this.member = member;
    }

    @Override
    public int compareTo(Element o) {
        if (score == o.score) {
            return member.compareTo(o.member);
        }
        return (int)(score - o.score);
    }
}
